<%@ Page Title="Store Control Panel" Language="C#" MasterPageFile="~/Views/Shared/Employee.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<DomainModel.Entities.Store>>" %>

<asp:Content ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ContentPlaceHolderID="MainContent" runat="server">

<% using (Html.BeginForm("Index", "StoresManagement"))
   { %>
   
    <h2>Existing Stores</h2>
     
    <table class="storemanager" style="width: 650px" cellspacing="0" id="StoresTable">
        <thead>
        <tr>
            <th>Store</th>
            <th>Actions</th>
       </tr>
       </thead>
       <tbody>
        <% foreach (var item in Model)
           { %>
             <tr>
                <td style="width: 180px"><%= Html.Encode(item.Name) %></td>               
                <td style="width: 150px">
                    <%= Html.ActionLink("Edit", "Edit", new { item.StoreID })%> |
                    <%= Html.ActionLink("Delete", "Delete", new { item.StoreID })%> |
                    <%= Html.ActionLink("Select", "Select", new { item.StoreID })%> 
                </td>
            </tr>      
        <% } %>
    </tbody>
    </table>
    
    <p><%= Html.ActionLink("Add A New Store", "Create")%></p>
        
<% } %>

</asp:Content>
